package com.xkcyy.module.base;

import com.xkcyy.module.a.ModuleAConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;

/**
 * ${NAME}
 *
 * @author yuand
 * @date ${DATE}
 */
@SpringBootApplication
@ComponentScan(basePackageClasses = {ModuleAConfig.class})
public class ConfigApplication implements CommandLineRunner {
    @Autowired
    Environment environment;

    public static void main(String[] args) {
        SpringApplication.run(ConfigApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        String a = environment.getProperty("aa.a");
        System.out.println(a);
    }
}
